package com.taotao.complier.calcu.ast;

import com.taotao.complier.calcu.visit.Visitor;
import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public class FactorNode implements AstNode {

    // factor -> num

    private NumNode num;


    @Override
    public void accept(Visitor visitor) {

        num.accept(visitor);

        visitor.visitFactor(this);
    }

    @Override
    public String toString() {
        return "FactorNode{" +
                "num=" + num +
                '}';
    }
}
